-
Notifications
You must be signed in to change notification settings - Fork 350
chore: venderダウンロード時、retryFetchでエラーになったときもリトライするように変更 #2616
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
🚀 プレビュー用ページを作成しました 🚀 更新時点でのコミットハッシュ: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR improves the retry mechanism during vendor downloads by ensuring that errors thrown during fetch requests are caught and logged, so that the operation can be retried.
- Added a try-catch around the fetch call in the retry loop
- Modified error logging for fetch failures
Comments suppressed due to low confidence (1)
tools/helper.mts:23
- The final fetch call is not wrapped in a try-catch block, which might lead to unhandled errors if the request fails. Consider wrapping it in a try block to maintain consistent error handling throughout the function.
return fetch(url, options);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the retryFetch function to ensure that a network error or a non-OK response from fetch leads to a retry attempt.
- The for loop is modified to iterate one additional time by changing the loop condition.
- A try/catch block is added to handle errors from fetch and log them properly.
Comments suppressed due to low confidence (1)
tools/helper.mts:11
- With the current change, the loop attempts fetch 'retries' times and then calls fetch one additional time after the loop, resulting in a total of retries+1 attempts. Consider adjusting the logic to ensure the total number of attempts matches the intended retry count.
for (let i = 0; i < retries; i++) {
内容
chore: venderダウンロード時、retryFetchでエラーになったときもリトライするように変更
関連 Issue
スクリーンショット・動画など
その他